@extends('desktop.cs.template.left')
@section('cs-content')
<div class="row">
	<div class="books">
		@foreach($bookshelves as $bookshelf)
		<div class="book">
			<div class="media">
				<div class="media-left">
					<a href="#"><img height="100%" src="{{ $bookshelf->book->thumbnailUrl() }}" alt="" /></a>
				</div>
				<div class="media-body">
					<h3 class="title"><a href="#">{{ $bookshelf->book->name }}</a></h3>
					<div class="author">
						<span class="fa fa-fw fa-user-circle-o"></span>
						{{ $bookshelf->book->author }} &nbsp;|&nbsp;
						{{ mb_substr($bookshelf->book->category->name, 0, 2) }} &nbsp;|&nbsp;
						{{ $bookshelf->book->font_num }}
					</div>
					<div class="desc">
						{!! $bookshelf->book->abstract !!}
					</div>
					<div class="row">
						<div class="col-xs-8">
							<div class="info">
								继续阅读：<a href="{{ url('/books/'.$bookshelf->book->order.'/sections/'.$bookshelf->getSection()->order) }}">{{ $bookshelf->getSection()->name }}</a>
							</div>
						</div>
						<div class="col-xs-4 text-right canel-collection">
						{!! Form::open(array('method' => 'DELETE', 'url' => 'cs/bookshelves/'.$bookshelf->id , 'class' => 'inline')) !!}
							<a class="btn btn-sm btn-danger" href="#" onclick="$(this).parent('form').submit();">取消收藏</a>
						{!! Form::close() !!} 
						</div>
					</div>
				</div>
			</div>
		</div>
		@endforeach
	</div>
</div>
<div class="text-center">
	{!! $bookshelves->render() !!}
</div>
@endsection